# encoding: utf-8
import os

DEBUG = True

# SECRET_KEY = os.urandom(24)
SECRET_KEY = 'sagagasfas.vagavdaga..csv'
CMS_USER_ID = 'bacvkjabdhsac'
Front_USER_ID = 'vmakbsboqnea'

# 数据库信息
DB_USERNAME = 'root'
DB_PASSWORD = 'fdk.1996'
DB_NAME = 'bbs'
DB_HOST = '127.0.0.1'
DB_PORT = '3306'
DB_URI = 'mysql+pymysql://{}:{}@{}:{}/{}?charset=utf8'.format(DB_USERNAME, DB_PASSWORD, DB_HOST, DB_PORT, DB_NAME)

SQLALCHEMY_DATABASE_URI = DB_URI
SQLALCHEMY_TRACK_MODIFICATIONS = False

# 邮箱配置信息
# MAIL_USE_TLS:端口号 587
# MAIL_USE_SSL:端口号 465
MAIL_SERVER = 'smtp.qq.com'
MAIL_PORT = 465
# MAIL_USE_TLS = True
MAIL_USE_SSL = True
# MAIL_DEBUG：默认app.debug
MAIL_USERNAME = '978326643@qq.com'
MAIL_PASSWORD = 'cxjmimkgzxzpbahg'
MAIL_DEFAULT_SENDER = '978326643@qq.com'

# Ueditor存储设置
UEDITOR_UPLOAD_PATH = os.path.join(os.path.dirname(__file__),'images')

# UEDITOR_UPLOAD_TO_QINIU = True
# UEDITOR_QINIU_ACCESS_KEY = "66CRz5bl1rPcfcBCA7JEO62fZut_BgGMi3pGF0kR"
# UEDITOR_QINIU_SECRET_KEY = "3ERC5C8NogELpZlNyiQkPZDl2RYlzuP8HVO9Kwn4"
# UEDITOR_QINIU_BUCKET_NAME = "bbs-test"
# UEDITOR_QINIU_DOMAIN = "http://pen0pyon9.bkt.clouddn.com/"

# flask-paginate分页设置
# 单页显示的帖子数
PER_PAGE = 10

# celery异步发送邮件配置
CELERY_RESULT_BACKEND = 'redis://127.0.0.1:6379/0'
CELERY_BROKER_URL = 'redis://127.0.0.1:6379/0'
